package com.itfenghuang.day01;
//标准的Java实体化
//    1.属性私有化  2 空参和实参   3.提供对应的get和get方法
public class Animal {
    private String name;
    private String color;
    private String sex;

    private  void eat(){
        System.out.println("吃");
    }
    //构造方法
    public Animal() {
    }

    public Animal(String name, String color, String sex) {
        this.name = name;
        this.color = color;
        this.sex = sex;
    }
    //封装 alt+insert 选择 eq  and  ha
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
